package com.ciaojian.store.model.query;

import com.ciaojian.core.enums.business.OrderCustomerTypeEnum;
import com.ciaojian.core.enums.business.OrderOrderTypeEnum;
import com.ciaojian.core.enums.business.OrderStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.Max;
import javax.validation.constraints.NotNull;
import java.math.BigInteger;
import java.util.Date;

/**
 * @author Atlakyn
 */
@ApiModel("查询参数")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class OperationOrderQuery {
    @ApiModelProperty("订单id")
    private BigInteger orderId;

    @ApiModelProperty("服务名称")
    private String serviceName;

    @ApiModelProperty("发型师名称")
    private String workerName;

    @ApiModelProperty("用户名")
    private String userName;

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("门店名称")
    private String storeName;

    @ApiModelProperty("订单号")
    private String orderNo;

    @ApiModelProperty("取号开始时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date startAddTime;

    @ApiModelProperty("取号结束时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endAddTime;

    @ApiModelProperty("支付类型")
    private String payType;

    @ApiModelProperty("订单状态")
    private OrderStatusEnum status;

    @ApiModelProperty("订单类型")
    @NotNull(message = "请选择订单类型")
    private OrderOrderTypeEnum orderType;

    @ApiModelProperty("顾客属性")
    private OrderCustomerTypeEnum customerType;

    @ApiModelProperty("邀请发型师")
    private Integer inviterId;

    @ApiModelProperty("页码")
    @Builder.Default
    private Integer pageNo = 0;

    @ApiModelProperty("页码大小")
    @Builder.Default
    @Max(value = 100, message = "每页查询不能超过 100 条")
    private Integer pageSize = 6;
}
